package cn.smart.epic.common.exception;

/**
 * @Auther Uncle_Z
 * @date 2018/6/13 10:57
 * @Email:2545375@qq.com
 * @Descrition 业务异常的封装
 * @since 1.0
 */

public class BussinessException extends RuntimeException {

    //友好提示的code码
    private int friendlyCode;

    //友好提示
    private String friendlyMsg;

    public BussinessException(BizExceptionEnum bizExceptionEnum){
        this.friendlyCode=bizExceptionEnum.getCode();
        this.friendlyMsg=bizExceptionEnum.getMessage();
    }

    public int getFriendlyCode() {
        return friendlyCode;
    }

    public void setFriendlyCode(int friendlyCode) {
        this.friendlyCode = friendlyCode;
    }

    public String getFriendlyMsg() {
        return friendlyMsg;
    }

    public void setFriendlyMsg(String friendlyMsg) {
        this.friendlyMsg = friendlyMsg;
    }
}
